home *** CD-ROM | disk | FTP | other *** search
/ 3D GFX / 3D GFX.iso / amiutils / i_l / irit5 / triv_lib / triv_ftl.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-31  |  1.7 KB  |  34 lines

  1. /******************************************************************************
  2. * Triv_ftl.c - default FatalError function for the triv library.          *
  3. *******************************************************************************
  4. * Written by Gershon Elber, April. 93.                          *
  5. ******************************************************************************/
  6.  
  7. #include <stdio.h>
  8. #include "triv_loc.h"
  9.  
  10. /*****************************************************************************
  11. * DESCRIPTION:                                                               M
  12. * Trap Triv_lib errors right here. Provides a default error handler for the  M
  13. * triv library. Gets an error description using TrivDescribeError, prints it M
  14. * and exit the program using exit.                                           M
  15. *                                                                            *
  16. * PARAMETERS:                                                                M
  17. *   ErrID:      Error type that was raised.                                  M
  18. *                                                                            *
  19. * RETURN VALUE:                                                              M
  20. *   void                                                                     M
  21. *                                                                            *
  22. * KEYWORDS:                                                                  M
  23. *   TrivFatalError, error handling                                           M
  24. *****************************************************************************/
  25. void TrivFatalError(TrivFatalErrorType ErrID)
  26. {
  27.     char
  28.     *ErrorMsg = TrivDescribeError(ErrID);
  29.  
  30.     fprintf(stderr, "TRIV_LIB: %s\n", ErrorMsg);
  31.  
  32.     exit(-1);
  33. }
  34.